Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

govet: add a warning about the deprecation of check-shadowing #4535

Merged
merged 3 commits into from
Mar 19, 2024

Conversation

ldez
Copy link
Member

@ldez ldez commented Mar 19, 2024

It was "unofficially" deprecated since v1.19 (2019) (inside #697).

https://github.com/golangci/golangci-lint/pull/697/files#diff-5144159bbaf9571c0fb12b9077a23f5dd046eda75d10c4d02c8317d071b54019R124

I think it's time to add a warning to deprecate it.

The deprecation message is complex because there are several possible configurations:

  • check-shadowing + enable-all
  • check-shadowing + disable-all
  • check-shadowing + enable
  • check-shadowing + disable

@ldez ldez added enhancement New feature or improvement linter: update Update the linter implementation inside golangci-lint labels Mar 19, 2024
@ldez ldez added this to the next milestone Mar 19, 2024
@ldez ldez force-pushed the feat/deprecate-govet-check-shadowing branch from 5afab67 to 5d625d7 Compare March 19, 2024 01:10
@ldez ldez requested review from bombsimon and alexandear March 19, 2024 02:14
Copy link
Member

@alexandear alexandear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexandear
Copy link
Member

We can track usages in the wild:

image image

@ldez ldez merged commit 3dbe882 into golangci:master Mar 19, 2024
13 checks passed
@ldez ldez deleted the feat/deprecate-govet-check-shadowing branch March 19, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement linter: update Update the linter implementation inside golangci-lint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants